var vm = new Vue({
    el: "#app",
    data: {
        userName: '',
        phoneNumber: '',
        email: '',
        IDNumber: '',
        City: '',
        HospitalL: '',
        Department: '',
        next: false,
        Payee: '',
        payeeID: '',
        Paccount: '',
        Pbank: '',
        Pcity: '',
    },
    methods: {
        vaild() {
            if (this.userName.length > 4 || this.userName == '') {
                this.$toast('用户名错误');
            } else if (this.phoneNumber.length != 11) {
                this.$toast('手机位数11位');
            } else if (!/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(this.email)) {
                this.$toast('邮箱验证错误');
            } else if (this.IDNumber.length != 18) {
                this.$toast('身份证长度18位');
            } else if (this.City == '') {
                this.$toast('所在省市不能为空');
            } else if (this.HospitalL == '') {
                this.$toast('医院不能为空');
            } else if (this.Department == '') {
                this.$toast('科室未选');
            } else if (this.Payee.length > 4 || this.Payee == '') {
                this.$toast('收款人格式有误');
            } else if (this.payeeID.length != 18) {
                this.$toast('收款人身份证格式有误');
            } else if (this.Paccount == '') {
                this.$toast('银行账户未填');
            } else if (this.Pbank == '') {
                this.$toast('开户银行未填');
            } else if (this.Pcity == '') {
                this.$toast('收款人所在地不能为空');
            } else {
                this.next = true;
                if (this.next == true) {
                    window.location.href = 'inputCases.html?id=' + this.Department
                }
            }
        }
    },
}) /*  */